#include<stdio.h>
int main()
{
    float x, sum = 0;
    double price;
    scanf("%f",&x);
    if (x <= 15 ) {
        price = x * 4 / 3;
        sum += price;
    }
    
     if(x > 15) {
         price = sum + 2.5 * x - 17.5;
    }
    printf("%.2lf",price);
    return 0;
}